/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import type { StringObjType } from '@/components/_pages/AmountApply/index.d';
import request from '@/utils/request';
import { message } from 'antd';

export async function getCheckAccount(params: { mobile: string }): Promise<any> {
  return request('/LargeAmountApply/accountVerify', {
    method: 'POST',
    data: { ...params },
  }).then(({ code, msg, data }) => {
    if (code == 0) {
      message.info('操作成功');
    }
    if (code != 0) {
      message.error(msg);
    }
    return { code, data };
  });
}
export async function submitApply(params: StringObjType): Promise<any> {
  return request('/LargeAmountApply/editApply', {
    method: 'POST',
    data: { ...params },
  }).then(({ code, msg }) => {
    if (code == 0) {
      message.info('提交成功');
    }
    if (code != 0) {
      message.error(msg);
    }
    return { code };
  });
}
